package com.hk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvo implements InvocationHandler{
    Object object;

    public MyInvo(Object object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("代理开始执行==");
        Object result = method.invoke(object, args);
        System.out.println("代理执行结束==");

        return result;
    }
}
